/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package it.nyquistmeteocal.beans;

import it.nyquistmeteocal.entity.Event;
import it.nyquistmeteocal.boundary.EventManager;
import java.io.Serializable;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

/**
 *
 * @author stefano
 */

@Named(value = "provabean")
@RequestScoped
public class ProvaBean implements Serializable {

    private static final long serialVersionUID = 1L;

    @EJB
    private EventManager em;

    private List<Event> List;
    private String email;

    public List<Event> getList() {
        return List;
    }

    public void setList(List<Event> List) {
        this.List = List;
    }
    
    @PostConstruct
    public void init() {

        List = em.getEventsSearch(email);

    }
}
